import request from "@/utils/request";

/**
 * 流程图文件树
 */
export function getFilePathTree() {
    return request(
        {
            url: "/fs/file-path/file-tree",
            method: "get",
        }
    )
}

/**
 * 根据主键id获取文件信息
 * @param id
 */
export function findFilePathById(id: any) {
    return request(
        {
            url: "/fs/file-path/"+id,
            method: "get",
        }
    )
}

/**
 * 添加文件
 * @param data
 */
export function insertFilePath(data: any) {
    return request(
        {
            url: "/fs/file-path/insert",
            method: "post",
            data:data
        }
    )
}

/**
 * 修改文件
 * @param id
 * @param data
 */
export function updateFilePath(id:number,data: any) {
    return request(
        {
            url: "/fs/file-path/update/"+id,
            method: "put",
            data:data
        }
    )
}

/**
 * 删除文件
 * @param id
 */
export function deleteFilePath(id:number) {
    return request(
        {
            url: "/fs/file-path/"+id,
            method: "delete",
        }
    )
}